package com.wicket.okrapp.web.contorller;

import com.wicket.okrapp.biz.service.DivineDataService;
import com.wicket.okrapp.biz.service.dto.req.GenerateGenerateInstanceReqDto;
import com.wicket.okrapp.biz.service.dto.req.GenerateSpecMethodReqDto;
import com.wicket.okrapp.biz.service.dto.req.GenerateVerifyInterReqDto;
import com.wicket.okrapp.biz.service.dto.res.GenerateGenerateInstanceRespDto;
import com.wicket.okrapp.biz.service.dto.res.GenerateSpecMethodRespDto;
import com.wicket.okrapp.biz.service.dto.res.GenerateVerifyInterRespDto;
import com.wicket.okrapp.common.ro.OkrResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrapp.biz.service.dto.res.ImplementTimingTaskAcceptParametersRespDto;
import com.wicket.okrapp.biz.service.dto.req.ImplementTimingTaskAcceptParametersReqDto;
import com.wicket.okrapp.biz.service.dto.res.ObtainCycleEndFirstDayComRespDto;
import com.wicket.okrapp.biz.service.dto.req.ObtainCycleEndFirstDayComReqDto;
import com.wicket.okrapp.biz.service.dto.res.ObtainReceiveFieldComRespDto;
import com.wicket.okrapp.biz.service.dto.req.ObtainReceiveFieldComReqDto;
import com.wicket.okrapp.biz.service.dto.res.ObtainMaxOfCollectionsComRespDto;
import com.wicket.okrapp.biz.service.dto.req.ObtainMaxOfCollectionsComReqDto;
import com.wicket.okrapp.biz.service.dto.res.TransitionColumnToRowRespDto;
import com.wicket.okrapp.biz.service.dto.req.TransitionColumnToRowReqDto;
import com.wicket.okrapp.biz.service.dto.res.ImplementReceiveContentIdComRespDto;
import com.wicket.okrapp.biz.service.dto.req.ImplementReceiveContentIdComReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/app/divineData/")
public class DivineDataController {

    @Autowired
    DivineDataService divineDataService;

    /**
     * 【验证接口】D生成语义实例
     */
    @PostMapping("generateGenerateInstance")
    public OkrResult<GenerateGenerateInstanceRespDto> generateGenerateInstance(@RequestBody @Validated GenerateGenerateInstanceReqDto reqDTO) {
        return OkrResult.success(divineDataService.generateGenerateInstance(reqDTO));
    }

    /**
     * 生成验证接口
     */
    @PostMapping("generateVerifyInter")
    public OkrResult<GenerateVerifyInterRespDto> generateVerifyInter(@RequestBody @Validated GenerateVerifyInterReqDto reqDTO) {
        return OkrResult.success(divineDataService.generateVerifyInter(reqDTO));
    }

    /**
     * 生成缓存合并输出树状数据
     */
    @PostMapping("generateSpecMethod")
    public OkrResult<GenerateSpecMethodRespDto> generateSpecMethod(@RequestBody @Validated GenerateSpecMethodReqDto reqDTO) {
        return OkrResult.success(divineDataService.generateSpecMethod(reqDTO));
    }
/**
   * D3执行定时任务接收参数
   */
    @PostMapping("implementTimingTaskAcceptParameters")
    public OkrResult<ImplementTimingTaskAcceptParametersRespDto> implementTimingTaskAcceptParameters(@RequestBody @Validated ImplementTimingTaskAcceptParametersReqDto reqDTO){
    return OkrResult.success(divineDataService.implementTimingTaskAcceptParameters(reqDTO));
    }
/**
   * D3获取周期结束后第1天服务(公共)
   */
    @PostMapping("obtainCycleEndFirstDayCom")
    public OkrResult<ObtainCycleEndFirstDayComRespDto> obtainCycleEndFirstDayCom(@RequestBody @Validated ObtainCycleEndFirstDayComReqDto reqDTO){
    return OkrResult.success(divineDataService.obtainCycleEndFirstDayCom(reqDTO));
    }
/**
   * D3获取接收字段服务(公共)
   */
    @PostMapping("obtainReceiveFieldCom")
    public OkrResult<ObtainReceiveFieldComRespDto> obtainReceiveFieldCom(@RequestBody @Validated ObtainReceiveFieldComReqDto reqDTO){
    return OkrResult.success(divineDataService.obtainReceiveFieldCom(reqDTO));
    }
/**
   * D3-获取数据集最大值加一(公共)
   */
    @PostMapping("obtainMaxOfCollectionsCom")
    public OkrResult<ObtainMaxOfCollectionsComRespDto> obtainMaxOfCollectionsCom(@RequestBody @Validated ObtainMaxOfCollectionsComReqDto reqDTO){
    return OkrResult.success(divineDataService.obtainMaxOfCollectionsCom(reqDTO));
    }
/**
   * D数据集转字段(特殊方法)
   */
    @PostMapping("transitionColumnToRow")
    public OkrResult<TransitionColumnToRowRespDto> transitionColumnToRow(@RequestBody @Validated TransitionColumnToRowReqDto reqDTO){
    return OkrResult.success(divineDataService.transitionColumnToRow(reqDTO));
    }
/**
   * D3执行接收内容表主键id(公共)
   */
    @PostMapping("implementReceiveContentIdCom")
    public OkrResult<ImplementReceiveContentIdComRespDto> implementReceiveContentIdCom(@RequestBody @Validated ImplementReceiveContentIdComReqDto reqDTO){
    return OkrResult.success(divineDataService.implementReceiveContentIdCom(reqDTO));
    }
}
